Integrand size = 23, antiderivative size = 137 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=-4 a b d e n x+4 b^2 d e n^2 x+\frac {1}{4} b^2 e^2 n^2 x^2-4 b^2 d e n x \log \left (c x^n\right )-\frac {1}{2} b e^2 n x^2 \left (a+b \log \left (c x^n\right )\right )+2 d e x \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]
-4*a*b*d*e*n*x+4*b^2*d*e*n^2*x+1/4*b^2*e^2*n^2*x^2-4*b^2*d*e*n*x*ln(c*x^n) -1/2*b*e^2*n*x^2*(a+b*ln(c*x^n))+2*d*e*x*(a+b*ln(c*x^n))^2+1/2*e^2*x^2*(a+ b*ln(c*x^n))^2+1/3*d^2*(a+b*ln(c*x^n))^3/b/n
Time = 0.03 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.83 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {1}{4} b e^2 n x^2 \left (-2 a+b n-2 b \log \left (c x^n\right )\right )+2 d e x \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-4 b d e n x \left (a-b n+b \log \left (c x^n\right )\right ) \]
(b*e^2*n*x^2*(-2*a + b*n - 2*b*Log[c*x^n]))/4 + 2*d*e*x*(a + b*Log[c*x^n]) ^2 + (e^2*x^2*(a + b*Log[c*x^n])^2)/2 + (d^2*(a + b*Log[c*x^n])^3)/(3*b*n) - 4*b*d*e*n*x*(a - b*n + b*Log[c*x^n])
Time = 0.63 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.23, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {2788, 2767, 2009, 2788, 2733, 2009, 2739, 15}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx\) |
\(\Big \downarrow \) 2788 |
\(\displaystyle e \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2dx+d \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x}dx\) |
\(\Big \downarrow \) 2767 |
\(\displaystyle d \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x}dx+e \int \left (d \left (a+b \log \left (c x^n\right )\right )^2+e x \left (a+b \log \left (c x^n\right )\right )^2\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle d \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x}dx+e \left (d x \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-2 a b d n x-2 b^2 d n x \log \left (c x^n\right )+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2\right )\) |
\(\Big \downarrow \) 2788 |
\(\displaystyle d \left (d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x}dx+e \int \left (a+b \log \left (c x^n\right )\right )^2dx\right )+e \left (d x \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-2 a b d n x-2 b^2 d n x \log \left (c x^n\right )+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2\right )\) |
\(\Big \downarrow \) 2733 |
\(\displaystyle d \left (d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x}dx+e \left (x \left (a+b \log \left (c x^n\right )\right )^2-2 b n \int \left (a+b \log \left (c x^n\right )\right )dx\right )\right )+e \left (d x \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-2 a b d n x-2 b^2 d n x \log \left (c x^n\right )+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle d \left (d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x}dx+e \left (x \left (a+b \log \left (c x^n\right )\right )^2-2 b n \left (a x+b x \log \left (c x^n\right )-b n x\right )\right )\right )+e \left (d x \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-2 a b d n x-2 b^2 d n x \log \left (c x^n\right )+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2\right )\) |
\(\Big \downarrow \) 2739 |
\(\displaystyle d \left (\frac {d \int \left (a+b \log \left (c x^n\right )\right )^2d\left (a+b \log \left (c x^n\right )\right )}{b n}+e \left (x \left (a+b \log \left (c x^n\right )\right )^2-2 b n \left (a x+b x \log \left (c x^n\right )-b n x\right )\right )\right )+e \left (d x \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-2 a b d n x-2 b^2 d n x \log \left (c x^n\right )+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2\right )\) |
\(\Big \downarrow \) 15 |
\(\displaystyle e \left (d x \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-2 a b d n x-2 b^2 d n x \log \left (c x^n\right )+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2\right )+d \left (\frac {d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e \left (x \left (a+b \log \left (c x^n\right )\right )^2-2 b n \left (a x+b x \log \left (c x^n\right )-b n x\right )\right )\right )\) |
e*(-2*a*b*d*n*x + 2*b^2*d*n^2*x + (b^2*e*n^2*x^2)/4 - 2*b^2*d*n*x*Log[c*x^ n] - (b*e*n*x^2*(a + b*Log[c*x^n]))/2 + d*x*(a + b*Log[c*x^n])^2 + (e*x^2* (a + b*Log[c*x^n])^2)/2) + d*((d*(a + b*Log[c*x^n])^3)/(3*b*n) + e*(x*(a + b*Log[c*x^n])^2 - 2*b*n*(a*x - b*n*x + b*x*Log[c*x^n])))
3.1.87.3.1 Defintions of rubi rules used
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b *Log[c*x^n])^p, x] - Simp[b*n*p Int[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Simp[1/( b*n) Subst[Int[x^p, x], x, a + b*Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p} , x]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^( q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (d + e*x ^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.)) /(x_), x_Symbol] :> Simp[d Int[(d + e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x) , x], x] + Simp[e Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /; F reeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]
Time = 0.75 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.63
method | result | size |
parallelrisch | \(\frac {6 x^{2} \ln \left (c \,x^{n}\right )^{2} b^{2} e^{2} n -6 x^{2} \ln \left (c \,x^{n}\right ) b^{2} e^{2} n^{2}+3 x^{2} b^{2} e^{2} n^{3}+12 x^{2} \ln \left (c \,x^{n}\right ) a b \,e^{2} n -6 x^{2} a b \,e^{2} n^{2}+24 x \ln \left (c \,x^{n}\right )^{2} b^{2} d e n -48 x \ln \left (c \,x^{n}\right ) b^{2} d e \,n^{2}+48 x \,b^{2} d e \,n^{3}+6 x^{2} a^{2} e^{2} n +48 x \ln \left (c \,x^{n}\right ) a b d e n -48 x a b d e \,n^{2}+4 b^{2} d^{2} \ln \left (c \,x^{n}\right )^{3}+12 \ln \left (x \right ) a^{2} d^{2} n +24 x \,a^{2} d e n +12 a b \,d^{2} \ln \left (c \,x^{n}\right )^{2}}{12 n}\) | \(223\) |
risch | \(\text {Expression too large to display}\) | \(2543\) |
1/12*(6*x^2*ln(c*x^n)^2*b^2*e^2*n-6*x^2*ln(c*x^n)*b^2*e^2*n^2+3*x^2*b^2*e^ 2*n^3+12*x^2*ln(c*x^n)*a*b*e^2*n-6*x^2*a*b*e^2*n^2+24*x*ln(c*x^n)^2*b^2*d* e*n-48*x*ln(c*x^n)*b^2*d*e*n^2+48*x*b^2*d*e*n^3+6*x^2*a^2*e^2*n+48*x*ln(c* x^n)*a*b*d*e*n-48*x*a*b*d*e*n^2+4*b^2*d^2*ln(c*x^n)^3+12*ln(x)*a^2*d^2*n+2 4*x*a^2*d*e*n+12*a*b*d^2*ln(c*x^n)^2)/n
Leaf count of result is larger than twice the leaf count of optimal. 293 vs. \(2 (129) = 258\).
Time = 0.29 (sec) , antiderivative size = 293, normalized size of antiderivative = 2.14 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {1}{3} \, b^{2} d^{2} n^{2} \log \left (x\right )^{3} + \frac {1}{4} \, {\left (b^{2} e^{2} n^{2} - 2 \, a b e^{2} n + 2 \, a^{2} e^{2}\right )} x^{2} + \frac {1}{2} \, {\left (b^{2} e^{2} x^{2} + 4 \, b^{2} d e x\right )} \log \left (c\right )^{2} + \frac {1}{2} \, {\left (b^{2} e^{2} n^{2} x^{2} + 4 \, b^{2} d e n^{2} x + 2 \, b^{2} d^{2} n \log \left (c\right ) + 2 \, a b d^{2} n\right )} \log \left (x\right )^{2} + 2 \, {\left (2 \, b^{2} d e n^{2} - 2 \, a b d e n + a^{2} d e\right )} x - \frac {1}{2} \, {\left ({\left (b^{2} e^{2} n - 2 \, a b e^{2}\right )} x^{2} + 8 \, {\left (b^{2} d e n - a b d e\right )} x\right )} \log \left (c\right ) + \frac {1}{2} \, {\left (2 \, b^{2} d^{2} \log \left (c\right )^{2} + 2 \, a^{2} d^{2} - {\left (b^{2} e^{2} n^{2} - 2 \, a b e^{2} n\right )} x^{2} - 8 \, {\left (b^{2} d e n^{2} - a b d e n\right )} x + 2 \, {\left (b^{2} e^{2} n x^{2} + 4 \, b^{2} d e n x + 2 \, a b d^{2}\right )} \log \left (c\right )\right )} \log \left (x\right ) \]
1/3*b^2*d^2*n^2*log(x)^3 + 1/4*(b^2*e^2*n^2 - 2*a*b*e^2*n + 2*a^2*e^2)*x^2 + 1/2*(b^2*e^2*x^2 + 4*b^2*d*e*x)*log(c)^2 + 1/2*(b^2*e^2*n^2*x^2 + 4*b^2 *d*e*n^2*x + 2*b^2*d^2*n*log(c) + 2*a*b*d^2*n)*log(x)^2 + 2*(2*b^2*d*e*n^2 - 2*a*b*d*e*n + a^2*d*e)*x - 1/2*((b^2*e^2*n - 2*a*b*e^2)*x^2 + 8*(b^2*d* e*n - a*b*d*e)*x)*log(c) + 1/2*(2*b^2*d^2*log(c)^2 + 2*a^2*d^2 - (b^2*e^2* n^2 - 2*a*b*e^2*n)*x^2 - 8*(b^2*d*e*n^2 - a*b*d*e*n)*x + 2*(b^2*e^2*n*x^2 + 4*b^2*d*e*n*x + 2*a*b*d^2)*log(c))*log(x)
Time = 0.37 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.96 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\begin {cases} \frac {a^{2} d^{2} \log {\left (c x^{n} \right )}}{n} + 2 a^{2} d e x + \frac {a^{2} e^{2} x^{2}}{2} + \frac {a b d^{2} \log {\left (c x^{n} \right )}^{2}}{n} - 4 a b d e n x + 4 a b d e x \log {\left (c x^{n} \right )} - \frac {a b e^{2} n x^{2}}{2} + a b e^{2} x^{2} \log {\left (c x^{n} \right )} + \frac {b^{2} d^{2} \log {\left (c x^{n} \right )}^{3}}{3 n} + 4 b^{2} d e n^{2} x - 4 b^{2} d e n x \log {\left (c x^{n} \right )} + 2 b^{2} d e x \log {\left (c x^{n} \right )}^{2} + \frac {b^{2} e^{2} n^{2} x^{2}}{4} - \frac {b^{2} e^{2} n x^{2} \log {\left (c x^{n} \right )}}{2} + \frac {b^{2} e^{2} x^{2} \log {\left (c x^{n} \right )}^{2}}{2} & \text {for}\: n \neq 0 \\\left (a + b \log {\left (c \right )}\right )^{2} \left (d^{2} \log {\left (x \right )} + 2 d e x + \frac {e^{2} x^{2}}{2}\right ) & \text {otherwise} \end {cases} \]
Piecewise((a**2*d**2*log(c*x**n)/n + 2*a**2*d*e*x + a**2*e**2*x**2/2 + a*b *d**2*log(c*x**n)**2/n - 4*a*b*d*e*n*x + 4*a*b*d*e*x*log(c*x**n) - a*b*e** 2*n*x**2/2 + a*b*e**2*x**2*log(c*x**n) + b**2*d**2*log(c*x**n)**3/(3*n) + 4*b**2*d*e*n**2*x - 4*b**2*d*e*n*x*log(c*x**n) + 2*b**2*d*e*x*log(c*x**n)* *2 + b**2*e**2*n**2*x**2/4 - b**2*e**2*n*x**2*log(c*x**n)/2 + b**2*e**2*x* *2*log(c*x**n)**2/2, Ne(n, 0)), ((a + b*log(c))**2*(d**2*log(x) + 2*d*e*x + e**2*x**2/2), True))
Time = 0.20 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.45 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {1}{2} \, b^{2} e^{2} x^{2} \log \left (c x^{n}\right )^{2} - \frac {1}{2} \, a b e^{2} n x^{2} + a b e^{2} x^{2} \log \left (c x^{n}\right ) + 2 \, b^{2} d e x \log \left (c x^{n}\right )^{2} - 4 \, a b d e n x + \frac {1}{2} \, a^{2} e^{2} x^{2} + 4 \, a b d e x \log \left (c x^{n}\right ) + \frac {b^{2} d^{2} \log \left (c x^{n}\right )^{3}}{3 \, n} + 4 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} d e + \frac {1}{4} \, {\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} b^{2} e^{2} + 2 \, a^{2} d e x + \frac {a b d^{2} \log \left (c x^{n}\right )^{2}}{n} + a^{2} d^{2} \log \left (x\right ) \]
1/2*b^2*e^2*x^2*log(c*x^n)^2 - 1/2*a*b*e^2*n*x^2 + a*b*e^2*x^2*log(c*x^n) + 2*b^2*d*e*x*log(c*x^n)^2 - 4*a*b*d*e*n*x + 1/2*a^2*e^2*x^2 + 4*a*b*d*e*x *log(c*x^n) + 1/3*b^2*d^2*log(c*x^n)^3/n + 4*(n^2*x - n*x*log(c*x^n))*b^2* d*e + 1/4*(n^2*x^2 - 2*n*x^2*log(c*x^n))*b^2*e^2 + 2*a^2*d*e*x + a*b*d^2*l og(c*x^n)^2/n + a^2*d^2*log(x)
Leaf count of result is larger than twice the leaf count of optimal. 285 vs. \(2 (129) = 258\).
Time = 0.39 (sec) , antiderivative size = 285, normalized size of antiderivative = 2.08 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx=\frac {1}{3} \, b^{2} d^{2} n^{2} \log \left (x\right )^{3} + \frac {1}{4} \, {\left (b^{2} e^{2} n^{2} - 2 \, b^{2} e^{2} n \log \left (c\right ) + 2 \, b^{2} e^{2} \log \left (c\right )^{2} - 2 \, a b e^{2} n + 4 \, a b e^{2} \log \left (c\right ) + 2 \, a^{2} e^{2}\right )} x^{2} + \frac {1}{2} \, {\left (b^{2} e^{2} n^{2} x^{2} + 4 \, b^{2} d e n^{2} x + 2 \, b^{2} d^{2} n \log \left (c\right ) + 2 \, a b d^{2} n\right )} \log \left (x\right )^{2} + 2 \, {\left (2 \, b^{2} d e n^{2} - 2 \, b^{2} d e n \log \left (c\right ) + b^{2} d e \log \left (c\right )^{2} - 2 \, a b d e n + 2 \, a b d e \log \left (c\right ) + a^{2} d e\right )} x + {\left (b^{2} d^{2} \log \left (c\right )^{2} + 2 \, a b d^{2} \log \left (c\right ) + a^{2} d^{2}\right )} \log \left (x\right ) - \frac {1}{2} \, {\left ({\left (b^{2} e^{2} n^{2} - 2 \, b^{2} e^{2} n \log \left (c\right ) - 2 \, a b e^{2} n\right )} x^{2} + 8 \, {\left (b^{2} d e n^{2} - b^{2} d e n \log \left (c\right ) - a b d e n\right )} x\right )} \log \left (x\right ) \]
1/3*b^2*d^2*n^2*log(x)^3 + 1/4*(b^2*e^2*n^2 - 2*b^2*e^2*n*log(c) + 2*b^2*e ^2*log(c)^2 - 2*a*b*e^2*n + 4*a*b*e^2*log(c) + 2*a^2*e^2)*x^2 + 1/2*(b^2*e ^2*n^2*x^2 + 4*b^2*d*e*n^2*x + 2*b^2*d^2*n*log(c) + 2*a*b*d^2*n)*log(x)^2 + 2*(2*b^2*d*e*n^2 - 2*b^2*d*e*n*log(c) + b^2*d*e*log(c)^2 - 2*a*b*d*e*n + 2*a*b*d*e*log(c) + a^2*d*e)*x + (b^2*d^2*log(c)^2 + 2*a*b*d^2*log(c) + a^ 2*d^2)*log(x) - 1/2*((b^2*e^2*n^2 - 2*b^2*e^2*n*log(c) - 2*a*b*e^2*n)*x^2 + 8*(b^2*d*e*n^2 - b^2*d*e*n*log(c) - a*b*d*e*n)*x)*log(x)
Time = 0.45 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.11 \[ \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx={\ln \left (c\,x^n\right )}^2\,\left (\frac {b^2\,e^2\,x^2}{2}+2\,b^2\,d\,e\,x+\frac {a\,b\,d^2}{n}\right )+\ln \left (c\,x^n\right )\,\left (\frac {b\,\left (2\,a-b\,n\right )\,e^2\,x^2}{2}+4\,b\,d\,\left (a-b\,n\right )\,e\,x\right )+a^2\,d^2\,\ln \left (x\right )+\frac {e^2\,x^2\,\left (2\,a^2-2\,a\,b\,n+b^2\,n^2\right )}{4}+2\,d\,e\,x\,\left (a^2-2\,a\,b\,n+2\,b^2\,n^2\right )+\frac {b^2\,d^2\,{\ln \left (c\,x^n\right )}^3}{3\,n} \]